home *** CD-ROM | disk | FTP | other *** search
/ CyberMycha 2008 January / Cybermycha 1_2008.iso / Data.cab / _B1F97B53670749CEA40189FA4CCCDA35 < prev    next >
Encoding:
Text File  |  2004-03-17  |  1.3 KB  |  55 lines

  1. regc(0, "TFACTOR")
  2. regc4f( 5, %daycolor_r, %daycolor_g, %daycolor_b, %daycolor_a )
  3. regc4f( 7, %ambient_r, %ambient_g, %ambient_b, %ambient_a )
  4. pshader("
  5.  
  6. ;#include <consts.psh>
  7.  
  8. ps_2_0
  9.  
  10. def    c4, 20, 1, 0.0, 0.0
  11. ;def    c5, DAYCOLOR
  12. ;def    c7, AMBIENT
  13.  
  14. dcl    t0.xyzw        ; reflection texgen
  15. dcl    t1.xy        ; noise1 uv coords
  16. dcl    t2.xy        ; noise2 uv coords
  17. dcl    t3.xy        ; terrain colormap & lightmap
  18. dcl    t4.xyz        ; cubmap uvw coords
  19. dcl    t5.xy        ; sky uv coords
  20.  
  21. dcl_2d        s0    ; reflection map
  22. dcl_2d        s1    ; noise1
  23. dcl_2d        s2    ; noise2
  24. dcl_2d        s3    ; lightmap
  25. dcl_cube    s4    ; cubemap
  26. dcl_2d        s5    ; sky
  27.  
  28.  
  29.     texld    r1, t1, s1    ; noise
  30.     texld    r2, t2, s2    ; noise
  31.     texld    r3, t3, s3    ; RGB: terrain colormap, A: terrain lightmap
  32.     texld    r4, t4, s4    ; cubemapa ze odbiciem slonca
  33.     texld    r5, t5, s5    ; clouds
  34.  
  35.     mul    r0, r1, r2        ; creating noise
  36.     mad    r0, r0, c4.x, t0    ; ???
  37.     texldp    r0, r0, s0        ; wykrzywianie
  38.  
  39.     add_sat    r1, r1, r2         ; maska do blikow
  40.  
  41.     sub    r6.a, c4.y, r5.a    ; negacja cienia chmur
  42.     mul    r3.a, r6.a, r3.a    ; chmury * lightmapa
  43.     mul    r4, r4, r3        ; wyciecie blikow w cieniu
  44.  
  45.     sub    r6, c4.y, r1        ; negacja noisa do blikā‰¤w
  46.     mad_sat r0, r6, r4, r0        ; ograniczenie fal do odbicia od slonca
  47.     mad_sat r3.rgb, r3.a, c7, c7.a     ; zlagodzenie lightmapy
  48.  
  49.     mul    r0.rgb, r0, r3         ; nalozenie lightmapy
  50.  
  51.     mov    oC0, r0
  52.  
  53. ")
  54.  
  55.